package vue;

import java.awt.*;
import java.util.ArrayList;

import javax.swing.*;

import model.*;

public class VueFourmis extends JPanel{
	
	private Model model;
	private Fourmiliere fourmiliere;
	private ArrayList<Fourmi> fourmis;
	private int tailleCase;
	private int tailleFourmiliere;
	private int x;
	private int y;

	public VueFourmis(Model mod) {
		model = mod;
		fourmiliere = model.getMafourmiliere();
		fourmis = fourmiliere.getNosFourmis();
		x = fourmiliere.getX();
		y = fourmiliere.getY();
		tailleFourmiliere = fourmiliere.getTaille();
		tailleCase = mod.getTailleCase();
	}
	
	public void paint(Graphics g) {
		tracerFourmis(g);
	}
	
	public void tracerFourmis(Graphics g){
		
		System.out.println("\n**** TRACAGE DES FOURMIS ****");
		g.setColor(Color.RED);

		for(int i = 0; i < fourmis.size(); i++){
			
			System.out.println(fourmis.get(i).toString());
			g.fillOval(fourmis.get(i).getX(), fourmis.get(i).getY(), 8, 6);
		}
	}
	

}